<template>
  <div class="reCharge_page">

    <van-nav-bar
      title="近聘客服"
      left-arrow @click-left="$router.back()"
    >
      <!-- <template #right>
        <van-icon  @click="searchType = !searchType" name="search" size="20" style="margin-right: 20px; "/>
        <van-icon
          name="ellipsis"
          size="18"
          @click="showOverlay = false"
        />
      </template> -->
    </van-nav-bar>
    <van-overlay
      :show="showOverlay"
      @click="showOverlay = false"
      class="over_layer"
    >
      <van-cell-group class="layer">
        <!-- <van-cell value="店铺"/> -->
      </van-cell-group>
    </van-overlay>
    <van-search v-show="searchType == true" v-model="value" placeholder="请输入客服名称" />
      <!-- <div class="list_content" v-for="(item,index) in GetManualServiceList" :key='index'>
        <div @click="chat(item,index)" class='list'>
          <div class="left">
            <img :src="item.UserImage" style='width:100%;height:100%' alt="">
          </div>
          <div class='right'>
            <div class="up">{{item.GroupName}}</div>
          </div>
        </div>
      </div> -->
      <div class="serverce">
        <div>13790143381</div>
        <div class="copy" @click="copy('13790143381')">复制号码添加客服微信</div>
      </div>
  </div>
</template>

<script>

import {Toast} from 'vant'
export default {
  name: 'reCharge',
  data(){
    return {
      searchType:false,
      value:'',
      smtype:true,
      showOverlay:false,
      userInfo:'',
      GetManualServiceList:[]
    }
  },
  components:{
   
  },
  created(){
    let userInfo = localStorage.getItem('userInfo')
    console.log(JSON.parse(userInfo))
    let GetManualServiceList = localStorage.getItem('GetManualServiceList')
    console.log(JSON.parse(GetManualServiceList))
    this.GetManualServiceList = JSON.parse(GetManualServiceList)
    this.userInfo = JSON.parse(userInfo)
  },
  methods:{
    // 复制
    copy(val){
      this.$copyText(val).then(
        function(e) {
          Toast.success('已复制')
        },
        function(e) {
          Toast.fail('复制出错了')
        }
      )
    },
     goBack(){
         this.$router.go('-1')
     },
     chat(data,i){
        console.log(data)
        data.MessagePage = 'platform'
        // data.isRead = 0
        this.signaR.getMessage(data)
        this.$router.push({name: 'chat', params: data})
        // this.$router.push('chat')
      },
     
  
     
      
  },
   

}
</script>

<style scoped lang='scss'>
.title{
  height: 300px;
  width: 300px;
  text-align: left;
  font-size: 18px;
  margin: 20px auto 0;
}
.list_content{
  width:100%;
  background:#fff;
}
.list{
  padding:10px;
  display: flex;
  border-bottom:1px solid #ccc;
  .left{
    width:40px;
    height:40px;
    border-radius: 5px;
    margin-right: 10px;
  }
  .right{
    .up{
      font-size:16px;
    }
  }
}
.serverce{
  width:100%;
  text-align: center;
  margin-top: 100px;
  .copy{
    margin: 10px 0;
    color:blue;
  }
}
</style>
